<#if user?? && user.linkType?? && user.linkType == "csgly" > <!--参赛管理 -->
	<#include "sshdXqListTemplate.html">
<#else>
	您没有权限查看该功能
</#if>
<#macro xmtopic>
${matchProject.matName!} 
</#macro>
<#macro toolbarButton> 
<style>
.xm_button .el-button1{
	background-color: #00a3de;
}
.xm_button .el-button2{
	background-color: #0089de;
}
.xm_button .el-button3{
	background-color: #1c6dc9;
}
.xm_button img {margin-right: 6px;}
</style>
<button  type="button" class="el-button3" onclick="retPwd()"><span style="font-size: 16px;"><img src="static/cms/www/default/img/sshd/submit.png"/>重置密码</span></button>
<button  type="button" class="el-button2" onclick="reflushWindow(true)"><span style="font-size: 16px;"><img src="static/cms/www/default/img/sshd/shuaxin.png"/>刷新</span></button>
<button  type="button" onclick="addDivShowWindow('cntent_acount')" class="el-button1"><span style="font-size: 16px;"><img src="static/cms/www/default/img/sshd/add.png"/>添加帐号</span></button>
</#macro>
<#macro tableDataList>
    <tbody>
<#if dataList??>
  <#list dataList as data>
    <tr>  
	    <td name="xmId" class="g_checkbox"><input name="acountName" type="checkbox" value="${data.id!}"></input></td>
	    <td>${data.loginName!}</td>
	    <td>${data.name!}</td>
	    <td><@jmax.dc key="MATCH_COMPANY_INFO" code="${(data.companyName)!}" /></td> 
	    <td>${data.accountPost!}</td>  
	    <td>${data.accountTel!}</td>
	    <td>${data.accountEmail!}</td>  
	    <td><@jmax.dc key="USER_STATUS" code="${data.status!}" /></td> 
	    <td>
	    <#if data.status?? && data.status == '0'>
			<a onclick="delsshdAcount(this,${data.id!},'${data.status!}')">[启用]</a>
		<#else>
		    <a onclick="delsshdAcount(this,${data.id!},'${data.status!}')">[禁用]</a>
		</#if>
		</td>  
	</tr>  
  </#list>
 </#if>
  </tbody>
</#macro>
<#macro contentListShow>

	<#include "sshdXqTable.html">
	<@createTable styleClass='container1100' tabfields = ['用户名','姓名','院系','职务','联系电话','电子邮箱','状态','操作'] isCheckBox=true checkBoxName='acountName' func=tableDataList  funcButton=buttonOprator1/>
	<#include "pager.html">
</#macro>
<#macro buttonOprator1>
</#macro>
<#macro buttonOprator>
	<#include "sshdXmAcountEdit.html"> 
	<@saveXmEdit/>
</#macro>
<#macro extendJs>
<script>
function delsshdAcount(obj,id,type) {
	$.confirm({
    title: '提示',
    content: '你确认要'+obj.innerHTML +'吗?',
    confirm: function(){
        var urldo = type=="0" ? "enableUserItems" : "disableUserItems";
		$.ajax({
		     type: 'POST',
		     url: "matchManager.do?"+urldo+"&matchProjectId=${(matchProject.id)!}",
		     dataType : 'json',  
		     data: {ids:id},
		     success: function(data) {
		     	alertMessage(data,true,null);
	         },
     	    error:function(data,textstatus){
     	    	errorMessage();
           }  
		  });
    },
    cancel: function(){
    }
});
}
function retPwd() {

	var ids = ""; 
	
	$('input[name="acountName"]:checked').each(function(){ 
		ids += $(this).val() +",";
	}); 
	if(ids == "") {
		$.alert(ids.length==0 ?'你还没有选择任何内容！':ids); 
		return;
	}
	$.confirm({
    title: '提示',
    content: '你确认要重置密码吗?',
    confirm: function(){
		$.ajax({
		     type: 'POST',
		     url: "matchManager.do?resetPwd",
		     dataType : 'json',  
		     data: {ids:ids},
		     success: function(data) {
		     	alertMessage(data,true,null);
	         },
     	    error:function(data,textstatus){
     	    	errorMessage();
           }  
		  });
    },
    cancel: function(){
    }
});
}
</script>
</#macro>